3.3.86 \(\int \frac {d+e x}{x^3 (a+c x^2)} \, dx\) [286]

Optimal. Leaf size=73 \[ -\frac {d}{2 a x^2}-\frac {e}{a x}-\frac {\sqrt {c} e \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{a^{3/2}}-\frac {c d \log (x)}{a^2}+\frac {c d \log \left (a+c x^2\right )}{2 a^2} \]

[Out]

-1/2*d/a/x^2-e/a/x-c*d*ln(x)/a^2+1/2*c*d*ln(c*x^2+a)/a^2-e*arctan(x*c^(1/2)/a^(1/2))*c^(1/2)/a^(3/2)

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 73, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {815, 649, 211, 266} \begin {gather*} -\frac {\sqrt {c} e \text {ArcTan}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{a^{3/2}}+\frac {c d \log \left (a+c x^2\right )}{2 a^2}-\frac {c d \log (x)}{a^2}-\frac {d}{2 a x^2}-\frac {e}{a x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(d + e*x)/(x^3*(a + c*x^2)),x]

[Out]

-1/2*d/(a*x^2) - e/(a*x) - (Sqrt[c]*e*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/a^(3/2) - (c*d*Log[x])/a^2 + (c*d*Log[a + c
*x^2])/(2*a^2)

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 266

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 649

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[(-a)*c]

Rule 815

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(
d + e*x)^m*((f + g*x)/(a + c*x^2)), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && Integer
Q[m]

Rubi steps

\begin {align*} \int \frac {d+e x}{x^3 \left (a+c x^2\right )} \, dx &=\int \left (\frac {d}{a x^3}+\frac {e}{a x^2}-\frac {c d}{a^2 x}-\frac {c (a e-c d x)}{a^2 \left (a+c x^2\right )}\right ) \, dx\\ &=-\frac {d}{2 a x^2}-\frac {e}{a x}-\frac {c d \log (x)}{a^2}-\frac {c \int \frac {a e-c d x}{a+c x^2} \, dx}{a^2}\\ &=-\frac {d}{2 a x^2}-\frac {e}{a x}-\frac {c d \log (x)}{a^2}+\frac {\left (c^2 d\right ) \int \frac {x}{a+c x^2} \, dx}{a^2}-\frac {(c e) \int \frac {1}{a+c x^2} \, dx}{a}\\ &=-\frac {d}{2 a x^2}-\frac {e}{a x}-\frac {\sqrt {c} e \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{a^{3/2}}-\frac {c d \log (x)}{a^2}+\frac {c d \log \left (a+c x^2\right )}{2 a^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 73, normalized size = 1.00 \begin {gather*} -\frac {d}{2 a x^2}-\frac {e}{a x}-\frac {\sqrt {c} e \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{a^{3/2}}-\frac {c d \log (x)}{a^2}+\frac {c d \log \left (a+c x^2\right )}{2 a^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)/(x^3*(a + c*x^2)),x]

[Out]

-1/2*d/(a*x^2) - e/(a*x) - (Sqrt[c]*e*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/a^(3/2) - (c*d*Log[x])/a^2 + (c*d*Log[a + c
*x^2])/(2*a^2)

________________________________________________________________________________________

Maple [A]
time = 0.69, size = 64, normalized size = 0.88

method result size
default \(-\frac {d}{2 a \,x^{2}}-\frac {e}{a x}-\frac {c d \ln \left (x \right )}{a^{2}}-\frac {c \left (-\frac {d \ln \left (c \,x^{2}+a \right )}{2}+\frac {a e \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c}}\right )}{a^{2}}\) \(64\)
risch \(\frac {-\frac {x e}{a}-\frac {d}{2 a}}{x^{2}}-\frac {c d \ln \left (x \right )}{a^{2}}+\frac {\left (\munderset {\textit {\_R} =\RootOf \left (a^{4} \textit {\_Z}^{2}-2 a^{2} c d \textit {\_Z} +a c \,e^{2}+c^{2} d^{2}\right )}{\sum }\textit {\_R} \ln \left (\left (3 a^{3} \textit {\_R}^{2}-3 \textit {\_R} a c d +2 e^{2} c \right ) x +a^{2} e \textit {\_R} +2 c d e \right )\right )}{2}\) \(102\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)/x^3/(c*x^2+a),x,method=_RETURNVERBOSE)

[Out]

-1/2*d/a/x^2-e/a/x-c*d*ln(x)/a^2-1/a^2*c*(-1/2*d*ln(c*x^2+a)+a*e/(a*c)^(1/2)*arctan(c*x/(a*c)^(1/2)))

________________________________________________________________________________________

Maxima [A]
time = 0.50, size = 62, normalized size = 0.85 \begin {gather*} -\frac {c \arctan \left (\frac {c x}{\sqrt {a c}}\right ) e}{\sqrt {a c} a} + \frac {c d \log \left (c x^{2} + a\right )}{2 \, a^{2}} - \frac {c d \log \left (x\right )}{a^{2}} - \frac {2 \, x e + d}{2 \, a x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/x^3/(c*x^2+a),x, algorithm="maxima")

[Out]

-c*arctan(c*x/sqrt(a*c))*e/(sqrt(a*c)*a) + 1/2*c*d*log(c*x^2 + a)/a^2 - c*d*log(x)/a^2 - 1/2*(2*x*e + d)/(a*x^
2)

________________________________________________________________________________________

Fricas [A]
time = 6.82, size = 157, normalized size = 2.15 \begin {gather*} \left [\frac {a x^{2} \sqrt {-\frac {c}{a}} e \log \left (\frac {c x^{2} - 2 \, a x \sqrt {-\frac {c}{a}} - a}{c x^{2} + a}\right ) + c d x^{2} \log \left (c x^{2} + a\right ) - 2 \, c d x^{2} \log \left (x\right ) - 2 \, a x e - a d}{2 \, a^{2} x^{2}}, -\frac {2 \, a x^{2} \sqrt {\frac {c}{a}} \arctan \left (x \sqrt {\frac {c}{a}}\right ) e - c d x^{2} \log \left (c x^{2} + a\right ) + 2 \, c d x^{2} \log \left (x\right ) + 2 \, a x e + a d}{2 \, a^{2} x^{2}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/x^3/(c*x^2+a),x, algorithm="fricas")

[Out]

[1/2*(a*x^2*sqrt(-c/a)*e*log((c*x^2 - 2*a*x*sqrt(-c/a) - a)/(c*x^2 + a)) + c*d*x^2*log(c*x^2 + a) - 2*c*d*x^2*
log(x) - 2*a*x*e - a*d)/(a^2*x^2), -1/2*(2*a*x^2*sqrt(c/a)*arctan(x*sqrt(c/a))*e - c*d*x^2*log(c*x^2 + a) + 2*
c*d*x^2*log(x) + 2*a*x*e + a*d)/(a^2*x^2)]

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 360 vs. \(2 (65) = 130\).
time = 1.73, size = 360, normalized size = 4.93 \begin {gather*} \left (\frac {c d}{2 a^{2}} - \frac {e \sqrt {- a^{5} c}}{2 a^{4}}\right ) \log {\left (x + \frac {- 12 a^{4} d \left (\frac {c d}{2 a^{2}} - \frac {e \sqrt {- a^{5} c}}{2 a^{4}}\right )^{2} - 2 a^{3} e^{2} \left (\frac {c d}{2 a^{2}} - \frac {e \sqrt {- a^{5} c}}{2 a^{4}}\right ) - 6 a^{2} c d^{2} \left (\frac {c d}{2 a^{2}} - \frac {e \sqrt {- a^{5} c}}{2 a^{4}}\right ) - 2 a c d e^{2} + 6 c^{2} d^{3}}{a c e^{3} + 9 c^{2} d^{2} e} \right )} + \left (\frac {c d}{2 a^{2}} + \frac {e \sqrt {- a^{5} c}}{2 a^{4}}\right ) \log {\left (x + \frac {- 12 a^{4} d \left (\frac {c d}{2 a^{2}} + \frac {e \sqrt {- a^{5} c}}{2 a^{4}}\right )^{2} - 2 a^{3} e^{2} \left (\frac {c d}{2 a^{2}} + \frac {e \sqrt {- a^{5} c}}{2 a^{4}}\right ) - 6 a^{2} c d^{2} \left (\frac {c d}{2 a^{2}} + \frac {e \sqrt {- a^{5} c}}{2 a^{4}}\right ) - 2 a c d e^{2} + 6 c^{2} d^{3}}{a c e^{3} + 9 c^{2} d^{2} e} \right )} + \frac {- d - 2 e x}{2 a x^{2}} - \frac {c d \log {\left (x \right )}}{a^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/x**3/(c*x**2+a),x)

[Out]

(c*d/(2*a**2) - e*sqrt(-a**5*c)/(2*a**4))*log(x + (-12*a**4*d*(c*d/(2*a**2) - e*sqrt(-a**5*c)/(2*a**4))**2 - 2
*a**3*e**2*(c*d/(2*a**2) - e*sqrt(-a**5*c)/(2*a**4)) - 6*a**2*c*d**2*(c*d/(2*a**2) - e*sqrt(-a**5*c)/(2*a**4))
 - 2*a*c*d*e**2 + 6*c**2*d**3)/(a*c*e**3 + 9*c**2*d**2*e)) + (c*d/(2*a**2) + e*sqrt(-a**5*c)/(2*a**4))*log(x +
 (-12*a**4*d*(c*d/(2*a**2) + e*sqrt(-a**5*c)/(2*a**4))**2 - 2*a**3*e**2*(c*d/(2*a**2) + e*sqrt(-a**5*c)/(2*a**
4)) - 6*a**2*c*d**2*(c*d/(2*a**2) + e*sqrt(-a**5*c)/(2*a**4)) - 2*a*c*d*e**2 + 6*c**2*d**3)/(a*c*e**3 + 9*c**2
*d**2*e)) + (-d - 2*e*x)/(2*a*x**2) - c*d*log(x)/a**2

________________________________________________________________________________________

Giac [A]
time = 1.01, size = 66, normalized size = 0.90 \begin {gather*} -\frac {c \arctan \left (\frac {c x}{\sqrt {a c}}\right ) e}{\sqrt {a c} a} + \frac {c d \log \left (c x^{2} + a\right )}{2 \, a^{2}} - \frac {c d \log \left ({\left | x \right |}\right )}{a^{2}} - \frac {2 \, a x e + a d}{2 \, a^{2} x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/x^3/(c*x^2+a),x, algorithm="giac")

[Out]

-c*arctan(c*x/sqrt(a*c))*e/(sqrt(a*c)*a) + 1/2*c*d*log(c*x^2 + a)/a^2 - c*d*log(abs(x))/a^2 - 1/2*(2*a*x*e + a
*d)/(a^2*x^2)

________________________________________________________________________________________

Mupad [B]
time = 1.25, size = 154, normalized size = 2.11 \begin {gather*} \frac {\ln \left (a\,e\,\sqrt {-a^5\,c}+3\,a^3\,c\,d-a^3\,c\,e\,x+3\,c\,d\,x\,\sqrt {-a^5\,c}\right )\,\left (e\,\sqrt {-a^5\,c}+a^2\,c\,d\right )}{2\,a^4}-\frac {\ln \left (a\,e\,\sqrt {-a^5\,c}-3\,a^3\,c\,d+a^3\,c\,e\,x+3\,c\,d\,x\,\sqrt {-a^5\,c}\right )\,\left (e\,\sqrt {-a^5\,c}-a^2\,c\,d\right )}{2\,a^4}-\frac {\frac {d}{2\,a}+\frac {e\,x}{a}}{x^2}-\frac {c\,d\,\ln \left (x\right )}{a^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d + e*x)/(x^3*(a + c*x^2)),x)

[Out]

(log(a*e*(-a^5*c)^(1/2) + 3*a^3*c*d - a^3*c*e*x + 3*c*d*x*(-a^5*c)^(1/2))*(e*(-a^5*c)^(1/2) + a^2*c*d))/(2*a^4
) - (log(a*e*(-a^5*c)^(1/2) - 3*a^3*c*d + a^3*c*e*x + 3*c*d*x*(-a^5*c)^(1/2))*(e*(-a^5*c)^(1/2) - a^2*c*d))/(2
*a^4) - (d/(2*a) + (e*x)/a)/x^2 - (c*d*log(x))/a^2

________________________________________________________________________________________